import Vue from 'vue'
import App from '@/App.vue'
import router from '@/router'
import store from '@/store'
import ElementUI from 'element-ui'
import ZkTable from 'vue-table-with-tree-grid'
import VXETable from 'vxe-table'
import lodash from 'lodash'

import directives from '@/plugin/directives' // 插件 自定义指令

import './permission' // 路由守卫权限

import 'element-ui/lib/theme-chalk/index.css'

import 'vxe-table/lib/index.css'
import '@/styles/color.scss' // global color scss
import '@/styles/index.scss' // global scss

import 'xe-utils' // VXETable 工具库

import config from '@/config' // 项目全局配置
import vexTableConfig from '@/config/vex_table' // VXETable 全局配置
import { changeThemeColor } from '@/utils/theme' // 切换主题皮肤
const theme = store.getters.THEME
changeThemeColor(theme)

VXETable.setup(vexTableConfig)

Vue.prototype._ = lodash
Vue.prototype.$config = config

Vue.use(ElementUI)
Vue.use(ZkTable)
Vue.use(VXETable)
Vue.use(directives)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
